using AiQiuQuan.Sport.Model.Enums;
using System.ComponentModel.DataAnnotations;

namespace AiQiuQuan.Sport.Model.Models
{
    /// <summary>
    /// 新增支付单dto
    /// </summary>
    public class PayOrderAddDto
    {
        /// <summary>
        /// 商户订单号(内部业务订单号)
        /// </summary>
        [Required(AllowEmptyStrings = false, ErrorMessage = "商户订单号(内部业务订单号)必填")]
        public string OrderNo { get; set; }

        /// <summary>
        /// 业务id
        /// </summary>
        [Required(ErrorMessage = "业务id必填")]
        public Guid BusinessId { get; set; }

        /// <summary>
        /// 业务类型：1场馆场地订单、5活动订单、10比赛订单
        /// </summary>
        [Required(ErrorMessage = "业务类型：1场馆场地订单、5活动订单、10比赛订单必填")]
        public BusinessTypeEnum BusinessType { get; set; }

        /// <summary>
        /// 商品名称
        /// </summary>
        [Required(AllowEmptyStrings = false, ErrorMessage = "商品名称必填")]
        public string ProductName { get; set; }

        /// <summary>
        /// 商品描述
        /// </summary>
        [Required(AllowEmptyStrings = false, ErrorMessage = "商品描述必填")]
        public string ProductDescription { get; set; }

        /// <summary>
        /// 支付方式：1.微信支付、2支付宝支付、3.场馆会员卡支付
        /// </summary>
        [Required(ErrorMessage = "支付方式：1.微信支付、2支付宝支付、3.场馆会员卡支付必填")]
        public PayTypeEnum PayType { get; set; }

        /// <summary>
        /// 支付订单状态:1未支付、2已支付、3支付失败、5部分退款、6全部退款、10已过期、15已取消
        /// </summary>
        [Required(ErrorMessage = "支付订单状态:1未支付、2已支付、3支付失败、5部分退款、6全部退款、10已过期、15已取消必填")]
        public PayOrderStateEnum PayState { get; set; }

        /// <summary>
        /// 支付时间
        /// </summary>
        public DateTimeOffset? PayTime { get; set; }

        /// <summary>
        /// 支付备注
        /// </summary>
        [Required(AllowEmptyStrings = false, ErrorMessage = "支付备注必填")]
        public string PayRemark { get; set; }

        /// <summary>
        /// 订单金额
        /// </summary>
        [Required(ErrorMessage = "订单金额必填")]
        public decimal OrderAmount { get; set; }

        /// <summary>
        /// 实际支付金额
        /// </summary>
        [Required(ErrorMessage = "实际支付金额必填")]
        public decimal PayAmount { get; set; }

        /// <summary>
        /// 优惠金额
        /// </summary>
        [Required(ErrorMessage = "优惠金额必填")]
        public decimal DiscountAmount { get; set; }

        /// <summary>
        /// 补偿金额，可正可负
        /// </summary>
        [Required(ErrorMessage = "补偿金额，可正可负必填")]
        public decimal CompensationAmount { get; set; }

        /// <summary>
        /// 退款金额
        /// </summary>
        [Required(ErrorMessage = "退款金额必填")]
        public decimal RefundAmount { get; set; }

        /// <summary>
        /// 退款时间（最近一次）
        /// </summary>
        public DateTimeOffset? RefundTime { get; set; }

        /// <summary>
        /// 退款备注
        /// </summary>
        [Required(AllowEmptyStrings = false, ErrorMessage = "退款备注必填")]
        public string RefundRemark { get; set; }
    }
}
